# # 打印 1~10
# for i in range(1, 11):
#     print(i)
#
# # 打印 2，4，6，8,10
# for i in range(2, 12, 2):
#     print(i)

# 打印从 10到 1
# num = 10
# while num >= 1:
#     print(num)
#     num -= 1

# i = 10
# for i in range(10, 0, -1):
#     print(i)

# 求 1 + 2 + 3 + 4 +....+ 100的和
i = 1
theSum = 0
for i in range(1, 101):
    theSum += i
    i += 1

print(f"sum={theSum}")

